const AppAccessTokenName = 'app_access_token'

// 设置本地存储
export const setToken = function (token, expires) {
  window.sessionStorage.setItem(AppAccessTokenName, JSON.stringify(token))
}
// 获取本地存储
export const getToken = function () {
  return JSON.parse(window.sessionStorage.getItem(AppAccessTokenName))
}
// 判断是否登录
export const isLogin = function () {
  return window.sessionStorage.getItem(AppAccessTokenName)
}
// 注销本地存储
export const removeToken = function () {
  return window.sessionStorage.removeItem(AppAccessTokenName)
}
// 清空所有的数据
export const clearStorage = () => window.sessionStorage.clear()
// export default {
// }
